package com.abc.http.example.high;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.abc.http.example.common.model.User;

/**
 * @description: 简单集成控制器
 * @author: yansl.cn
 * @create: 2023-01-16 17:17
 */
@RestController
@RequestMapping("high")
public class HighController {

    @Autowired
    private HighAPI highAPI;

    public HighController() {
        System.out.println("//////////////////////////////");
    }

    @RequestMapping("get")
    public String get(String name) {
        return highAPI.get(name);
    }

    @RequestMapping("getByUser")
    public User getByUser() {
        return highAPI.getByUser();
    }

    @RequestMapping("list")
    public List<User> list() {
        return highAPI.list();
    }

    @RequestMapping("create")
    public User create() {
        return highAPI.createUser(new User("调用API0", 10));
    }

}
